<template>
    <div class="menu">
        <router-view></router-view>
        <van-tabbar v-model="active" route>
            <van-tabbar-item replace :to="item.path" v-for="item in tabbar" :key="item">{{ item.title }}</van-tabbar-item>
        </van-tabbar>

    </div>
</template>

<script setup>
import { ref } from 'vue'
const tabbar = ref([
    { path: '/home/sy', title: '首页' },
    { path: '/home/shopping', title: '商城' },
    { path: '/home/zhibo', title: '直播' },
    { path: '/home/my', title: '我' },
])
const active = ref(0);
</script>

<style scoped>
.menu {
    width: 100%;
    margin: auto;
}
</style>